package com.dhgate.spu.analysis.dao;

import com.dhgate.spu.analysis.consts.SysConsts;

/** 
 * @author:      wangguodong 
 * @create:      2014-3-24 下午3:05:14 
 * @description: 
 */
public class DAOFactory {
	private static final String COLLECTOR_PACKAGE_NAME = "com.dhgate.spu.analysis.dao.";
	private static IDAO instance = new JdbcDAO();
	
	public static void init() throws Exception{
		Class c = Class.forName(COLLECTOR_PACKAGE_NAME+SysConsts.DAO_NAME);
		instance= (IDAO) c.newInstance();
	}
	
	public static IDAO getDAOInstance(){
		return instance;
	}
}
